//== SAGITTARIUS ============================================================================

//== BEGINNING OF CODE ===============================================================

#ifndef __SAGUTTARUIS__PFOR__H_
#define __SAGUTTARUIS__PFOR__H_

//== INCLUDES ========================================================================

#include "sagittarius/core/SagittariusCore.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    uint64 bounds;
} ParForThr;

typedef struct _ParFor {
    void(*body)(struct _ParFor*, uint32);
    uint32 nthr;
    uint32 niter;
    uint32 thread_ctr;
    int32 wait;
    ParForThr thr[];
} ParFor;

ParFor* createPFor(uint32 nthr, uint32 niter, int32 wait, void(*body)(ParFor*, uint32));

void ParForDoLoop(ParFor* pf);

#ifdef __cplusplus
}//extern "C"
#endif

#endif
